<?php if(!defined('BASEPATH')) exit('No direct script access allowed');?>
 <table width="100%" cellpadding="0" cellspacing="0" border="1">
 <tr>
 
 <tr class="tr_b">
 <td width="80" class="td_l_c">编号</td>
 <td class="td_l_l">客户名称</td>
 <?php if (isset($value['ht_hnum'])){?>
 <td class="td_l_c">合同编号</td>
 <?php }?>
 <?php if (isset($value['ht_hsdate'])){?>
 <td class="td_l_c">起始时间</td>
 <?php }?>
 <?php if (isset($value['ht_hedate'])){?>
 <td class="td_l_c">到期时间</td>
 <?php }?>
 <?php if (isset($value['ht_htype'])){?>
 <td class="td_l_c">合同分类</td>
 <?php }?>
 <?php if (isset($value['ht_hmoney'])){?>
 <td class="td_l_c">总金额</td>
 <?php }?>
 <?php if (isset($value['ht_hrevenue'])){?>
 <td class="td_l_c">已收款</td>
 <?php }?>
 <?php if (isset($value['ht_howed'])){?>
 <td class="td_l_c">欠款</td>
 <?php }?>
 <?php if (isset($value['ht_hinvoice'])){?>
 <td class="td_l_c">提供发票</td>
 <?php }?>
 <?php if (isset($value['ht_htax'])){?>
 <td class="td_l_c">是否含税</td>
 <?php }?>
  
 <td class="td_l_c">合同状态</td>
  
 <?php if (isset($value['ht_haudit'])){?>
 <td class="td_l_c">审核人员</td>
 <?php }?>
 <?php if (isset($value['ht_hauditTime'])){?>
 <td class="td_l_c">审核时间</td>
 <?php }?>
 <?php if (isset($value['ht_huser'])){?>
 <td class="td_l_c">业务员</td>
 <?php }?>
 <?php if (isset($value['ht_htime'])){?>
 <td class="td_l_c">录入时间</td>
 <?php }?>
 
 
 </tr>

 <?php foreach($list as $arr=>$row) {?>
 <tr class="tr">
 <td class="td_l_c"><?php echo $row['id']?></td>
 <td class="td_l_l"><a onclick='Hetong_InfoView<?php echo $row['cid']?>()' style="cursor:pointer;"><?php echo $row['company']?></a></td>
 <?php if (isset($value['ht_hnum'])){?>
 <td class="td_l_c">
  
  <a  onclick='Hetong_InfoEdit<?php echo $row['id']?>()' style="color:red;cursor:pointer"><?php echo $row['number']?></a>
  
 </td>
 <?php }?>
 <?php if (isset($value['ht_hsdate'])){?>
 <td class="td_l_c"><?php echo $row['sdate']?></td>
 <?php }?>
 <?php if (isset($value['ht_hedate'])){?>
 <td class="td_l_c"><?php echo $row['edate']?></td>
 <?php }?>
 <?php if (isset($value['ht_htype'])){?>
 <td class="td_l_c"><?php echo $row['type']?></td>
 <?php }?>
  <?php if (isset($value['ht_hmoney'])){?>
 <td class="td_l_c"><?php echo $row['money']?></td>
 <?php }?>
 <?php if (isset($value['ht_hrevenue'])){?>
 <td class="td_l_c"><?php echo $row['revenue']?></td>
 <?php }?>
 <?php if (isset($value['ht_howed'])){?>
 <td class="td_l_c"><?php echo $row['arrears']?></td>
 <?php }?>
 <?php if (isset($value['ht_hinvoice'])){?>
 <td class="td_l_c"><?php echo $row['isinvoice']?></td>
 <?php }?>
 <?php if (isset($value['ht_htax'])){?>
 <td class="td_l_c"><?php echo $row['istax']?></td>
 <?php }?>
  
 <td class="td_l_c">
<a class="btn_sh<?php echo isset($audit[$row['state']]) ? $audit[$row['state']] : 1?>" onclick='Hetong_InfoAudit<?php echo $row['id']?>()'><?php echo $row['state']?></a>
 </td>
 
 <?php if (isset($value['ht_haudit'])){?>
 <td class="td_l_c"><?php echo $row['auditname']?></td>
 <?php }?>
 <?php if (isset($value['ht_hauditTime'])){?>
 <td class="td_l_c"><?php echo $row['auditdate']?></td>
 <?php }?>
 <?php if (isset($value['ht_huser'])){?>
 <td class="td_l_c"><?php echo $row['user']?></td>
 <?php }?>
 <?php if (isset($value['ht_htime'])){?>
 <td class="td_l_c"><?php echo $row['cdate']?></td>
 <?php }?>
  
 </tr>
 <?php }?>
 </table>